<template>
  <view>
    <u-popup
      :show="upoiashi"
      mode="bottom"
      :round="10"
      closeOnClickOverlay
      @close="close"
    >
      <view class="commonwordsnr">
        <view class="commonwordsnrtop">发送附件简历</view>
        <view class="commonwordsnrnot">
          <view
            v-for="(item, key) in datalist"
            :key="key"
            class="commonwordstext"
          >
            <view class="icons">
              <image src="/static/timimges/jl.png" class="imgest"></image>
            </view>
            <view class="textnrd textlinclamp">
              {{ item.Title }}
            </view>
            <view class="butfasho" @click="butfaclick(item)">发送</view>
          </view>
        </view>
      </view>
    </u-popup>
  </view>
</template>

<script>
export default {
  props: {
    upoiashi: {
      type: Boolean,
      default: false,
    },
  },
  //子组件
  components: {},
  data() {
    return {
      datalist: [],
    };
  },

  created() {
    this.fujianlist();
  },

  methods: {
    fujianlist() {
      this.$http.huirc.resumemy().then((res) => {
        if (res.Result) {
          console.log(res.Result);

          if (res.Result.Attachs.length > 0) {
            this.datalist = res.Result.Attachs;
          } else {
            uni.navigateTo({
              url: `/pages/views/packageB/type-jobhunting/enclosure`,
            });
          }
        }
      });
    },
    butfaclick(item) {
      console.log("butfashofj");
      this.$emit("butfashofj", item);
    },
    close() {
      console.log("close");
      this.$emit("butfashofj");
    },
  },
};
</script>

<style lang="scss" scoped>
.commonwordsnr {
  padding: 20rpx;

  .commonwordsnrtop {
    text-align: center;
    padding: 20rpx 20rpx;
    font-size: 36rpx;
    font-weight: 600;
  }

  .commonwordsnrnot {
    padding: 20rpx 0rpx;
    height: 300rpx;
    overflow-y: auto;

    .commonwordstext {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20rpx 20rpx;

      .icons {
        width: 10%;
        .imgest {
          width: 33rpx;
          height: 41rpx;
        }
      }

      .textnrd {
        width: 70%;
        font-size: 30rpx;
      }

      .butfasho {
        width: 20%;
        font-size: 26rpx;
        border-radius: 10rpx;
        padding: 10rpx 0rpx;
        text-align: center;

        color: #ffffff;
        background-color: #1684fc;
      }
    }
  }
}
</style>
